using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Application.Hr;

/// <summary>
/// HR-组织表
/// </summary>
public class HrOrganizationDto : AppEntity
{
    /// <summary>
    /// 父级编号
    /// </summary>
    [Required]
    public long ParentId { get; set; }

    /// <summary>
    /// 父级编号集合
    /// </summary>
    public List<string> ParentIdList { get; set; } = new ();

    /// <summary>
    /// 组织编码
    /// </summary>
    [Required]
    [StringLength(255)]
    public string Number { get; set; }

    /// <summary>
    /// 组织名称
    /// </summary>
    [Required]
    [StringLength(255)]
    public string Name { get; set; }

    /// <summary>
    /// 类型(1公司/2部门)
    /// </summary>
    [Required]
    public int Type { get; set; } = 1;

    /// <summary>
    /// 负责人
    /// </summary>
    [Required]
    public long InCharge { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string UpdateUser { get; set; }


}

/// <summary>
/// HR-组织表
/// </summary>
public class HrOrganizationSimple : AppEntity
{
    /// <summary>
    /// 组织名称
    /// </summary>
    public string Name { get; set; }
}